<?php

namespace App\Models\Bill;

use Illuminate\Database\Eloquent\Model;

class BillGoodsSale extends Model
{

    protected $table = 'goods_sale';

    protected $primaryKey = 'postID';

    public $timestamps = false;

    public $incrementing = false;

    public static function getGoods( $postID ) {


        $bill_goods_sale_data = self::where('postID',$postID)->get()->toArray();
        if ( !$bill_goods_sale_data ) {
            return [];
        }
        return $bill_goods_sale_data[0];
    }


}
